#ifndef OISHANDLER_H_
#define OISHANDLER_H_

#include <iostream>
#include <string>
#include <utility>
#include <map>

using std::cout;
using std::endl;
using std::string;
using std::ostringstream;

#include "OGRE/Ogre.h"
#include "OGRE/OgreEntity.h"
#include "OGRE/OgreSubEntity.h"
#include "OIS/OIS.h"

class OISHandler: public Ogre::WindowEventListener, public OIS::KeyListener, public OIS::MouseListener {
public:
	OISHandler();
	virtual ~OISHandler();

private:
	// Managers de entrada OIS
	OIS::InputManager* gestorEntrada;
	OIS::Keyboard* teclado;
	OIS::Mouse* raton;

	Ogre::SceneManager* mSceneMgr;
	Ogre::Camera* mCamera;

public:
	void setSceneValues(Ogre::SceneManager* pSceneMgr, Ogre::Camera* pCamera);
	void initialize(Ogre::RenderWindow* pWindow);
	void capture();

protected:
	virtual void windowClosed(Ogre::RenderWindow* mWindow);
	virtual void windowResized(Ogre::RenderWindow* mWindow);
	virtual bool windowClosing(Ogre::RenderWindow* mWindow);
	virtual bool keyPressed(const OIS::KeyEvent &arg);
	virtual bool keyReleased(const OIS::KeyEvent &arg);
	virtual bool mouseMoved(const OIS::MouseEvent &arg);
	virtual bool mousePressed(const OIS::MouseEvent &arg, OIS::MouseButtonID id);
	virtual bool mouseReleased(const OIS::MouseEvent &arg, OIS::MouseButtonID id);
};

#endif /* OISHANDLER_H_ */
